/*
  maths.cpp
*/

unsigned wrap2n (unsigned n)
{
  unsigned mask = 0x00000001;

	if (n == 0) return 0;
  while (mask && mask < n)
    mask <<= 1;
  return mask;
}
